package com.dbz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user")
public class User {
    @TableId(value = "uid")
    private String uid;//用户id
    @TableField(value = "uname")
    private String uname;//用户
    @TableField(value = "upassword")
    private String upassword;//密码
    @TableField(value = "isLockout")
    private String isLockout;//是否锁定
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "lastLoginTime")
    private Date lastLoginTime;//登陆时间
    @TableField(value = "psdWrongTime")
    private Integer psdWrongTime;//密码错误次数
    @TableField(value = "lockTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lockTime;//被锁定时间
    @TableField(value = "phone")
    private String phone;//手机号
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "creatTime")
    private Date creatTime;//创建时间
    @TableField(value = "endLockTime")
    private Date endLockTime;
    @TableField(value = "isLogin")
    private String isLogin;//是否登陆
}
